import BaseCURDV2Api from '@/framework/infra/base/BaseCURDV2Api'

class NewProductRegisterStyleNumApi extends BaseCURDV2Api {
  constructor() {
    super('pdt/new-product-register-style-num')
  }

  listMinePage(params) {
    const getParams = {...params}
    Object.keys(getParams).forEach(key => {
      if (Array.isArray(getParams[key])) {
        getParams[key] = getParams[key].join(',')
      }
    })
    return this.get('list-mine-page', getParams)
  }

  createMine(data) {
    return this.post('create-mine', data)
  }

  updateMine(data) {
    return this.post('update-mine', data)
  }
}

export const newProductRegisterStyleNumApi = new NewProductRegisterStyleNumApi()
